<?php
$title = 'Add new Album';

$this->headTitle($title);
$this->headScript()->prependFile($this->basePath() . '/js/jquery.validation.js');
?>
<script type="text/javascript">
	$(document).ready(function(){
		$('#infoAlbum').validation({
			rules: {
				title : "required",
				artist: "required",
			}
		});
	});
</script>
<div class="panel panel-primary">
	<div class="panel-heading text-center">
		<?php echo $this->escapeHtml($title);?>
	</div>
	<div class="panel-body">
	<?php
		$form = $this->form;
		$form->setAttribute('action', $this->url('album', array('action' => 'add')));
		$form->prepare();
		echo $this->form()->openTag($form);

		echo $this->formHidden($form->get('id'));
	?>
	<div class="form-group">	
		<?php	echo $this->formRow($form->get('title')); ?>
	</div>
	<div class="form-group">
		<?php echo $this->formRow($form->get('artist')); ?>
	</div>
	<div class="form-group">
		<?php echo $this->formSubmit($form->get('submit')); ?>
		<a href="<?php echo $this->url('album', array('action' => 'index')); ?>" class="btn btn-default">View all ablum</a>
		   
	</div>
	<?php echo $this->form()->closeTag(); ?>
	</div>
</div>